const svgCaptcha = require('svg-captcha')
exports.reguser_handler = async (ctx, next) => {
  ctx.body = 'reguser ok'
  await next()
}

exports.login_handler = async (ctx, next) => {
  ctx.body = 'login ok'
  await next()
}

// 图形验证码
exports.verify_handler = async (ctx, next) => {
  var captcha = svgCaptcha.create();
	// req.session.captcha = captcha.text;
	console.log(captcha.text)
  ctx.body = captcha.data
  await next()
}